<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
    pageEncoding="ISO-8859-1"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<%@taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>

<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">

<link type="text/css" href="css/menu.css" rel="stylesheet" />
<link type="text/css" href="css/js_slider.css" rel="stylesheet" />
<link type="text/css" href="css/popup.css" rel="stylesheet" />
<link type="text/css" href="css/jquery-ui-1.10.0.custom.min.css" rel="stylesheet" />
<link type="text/css" href="css/button.css" rel="stylesheet" />
<script type="text/javascript" src="js/jquery.js"></script>
<script type="text/javascript" src="js/menu.js"></script>
<script type="text/javascript" src="js/jquery-ui-1.10.0.custom.min.js"></script>
<title>Insert title here</title>
<script type="text/javascript" src="js/jquery.leanModal.min.js"></script>

<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"></script>
<!-- <script src="http://code.jquery.com/jquery-migrate-1.0.0.js"></script> -->

<script>
	function editable(number){
		$('#comment_' + number ).prop('disabled', false);
	}
</script>

<script>
     $(function() {
        $('#tabId4JS li a').click(function() {
           $('#tabId4JS li').removeClass();
           $($(this).attr('href')).addClass('active');
        });
     });
  </script>

</head>
<body>
	<div>
		<div style="float:left;">
		 	<img src="images/msg_logo.jpg" width="300" height="100" />
		 </div>
		 <div style="float:right;">
		<form action="Logout"  method="POST">
					<div>Welcome:  ${user}!</div>
					<input id="u_0_l" type="submit" tabindex="4" value="Log Out"/>
					</form>
					
					<jsp:useBean id="userBean" class="model.User" scope="session"/>
					<jsp:setProperty name="userBean" property="userName" value="${user}"/>
	</div>
	
	<br><br><br><br>
	<!-- HEADER -->
	<div id="menu">
		<ul class="menu" id ="tabId4JS">
			<c:if test="${!empty roles }">
				<c:forEach items="${roles}" var="roles">
					 <li id = "${roles}">
					 	<a href="?role=${roles}">
				        	<c:out value="${roles}" />
				        </a>
				    </li>
				</c:forEach>
		</c:if>
		</ul>
	</div>

	<div id="tabDiv" style="padding-top:60px">
		<c:set var="currentRole" value="<%= request.getParameter("role") %>"/>
		<c:choose>
			<c:when test="${currentRole== 'Director General'}">
				<c:import url="Director General.jsp"></c:import>
			</c:when>
			<c:when test="${currentRole == 'Director HR'}">
				<c:import url="Director HR.jsp"></c:import>
			</c:when>
				<c:when test="${currentRole== 'Recruiter'}">
				<c:import url="Recruiter.jsp"></c:import>
			</c:when>
			<c:when test="${currentRole == 'Director de Departament'}">
				<c:import url="Director de Departament.jsp"></c:import>
			</c:when>
			<c:when test="${currentRole == 'Administrator'}">
				<c:import url="Administrator.jsp"></c:import>
			</c:when>
			<c:otherwise>
				<c:import url="${role}.jsp"></c:import>
			</c:otherwise>
		</c:choose>
	</div>
</body>
</html>